import Header from '@/components/header/Header.vue'
import Footer from '@/components/foot/Foot.vue'
import ListItem from '@/components/listItem/listItem.vue'
import axios from 'axios'
export default {
  name: 'Category',
  created () {
    axios.get(`http://www.mei.com/appapi/event/product/v3?pageIndex=1&categoryId=${this.$route.params.categoryId}`)
      .then((res) => {
        console.log(res)
        this.datalist = res.data.products
      })
      .catch((err) => {
        console.log(err)
      })
  },
  data () {
    return {
      datalist: null
    }
  },
  components: {
    Header,
    Footer,
    ListItem
  }
}
